package com.ruoyi.door.controller.app.orderdetail;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.door.controller.admin.orderdetail.vo.DoorOrderDetailPageReqVO;
import com.ruoyi.door.controller.admin.orderdetail.vo.DoorOrderDetailRespVO;
import com.ruoyi.door.domain.DoorOrderDetail;
import com.ruoyi.door.service.DoorOrderDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 【订单明细】Controller
 * 
 * @author ruoyi
 * @date 2025-07-11
 */
@Api(value ="APP 订单明细管理",tags = "APP 订单明细管理")

@RestController
@RequestMapping("/app-api/door/detail")
public class AppDoorOrderDetailController extends BaseController
{
    @Autowired
    private DoorOrderDetailService doorOrderDetailService;

    /**
     * 查询【请填写功能名称】列表
     */
    @ApiOperation("查询【请填写功能名称】列表")

    @GetMapping("/list")
    public TableDataInfo list(DoorOrderDetailPageReqVO doorOrderDetail)
    {
        List<DoorOrderDetailRespVO> list = doorOrderDetailService.selectDoorOrderDetailList(doorOrderDetail, SecurityUtils.getUserId());
        return getDataTable(list);
    }




    /**
     * 获取【请填写功能名称】详细信息
     */
    @ApiOperation("获取【请填写功能名称】详细信息")

    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(doorOrderDetailService.selectDoorOrderDetailById(id));
    }


}
